package com.xm.servlet.background.orders;

import com.xm.service.background.LogisticsStationService;
import lombok.SneakyThrows;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 删除物流站
 * @author 康文程
 * @date 2024-1-13
 */
@WebServlet("/background/remove/station")
public class RemoveStationServlet extends HttpServlet {
    private final LogisticsStationService service = new LogisticsStationService();
    @SneakyThrows
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String stationId = req.getParameter("stationId");
        System.out.println(stationId);
        service.deleteLogisticsStationById(Integer.parseInt(stationId));
    }
}
